-
Notifications
You must be signed in to change notification settings - Fork 38
Introduce helper functions for signed<->unsigned conversions #1239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2b6eea0 to
c6deef6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mac Mini (M1, 2020) benchmarks
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
12296 cycles |
12295 cycles |
1.00 |
ML-KEM-512 encaps |
14953 cycles |
14952 cycles |
1.00 |
ML-KEM-512 decaps |
19491 cycles |
19488 cycles |
1.00 |
ML-KEM-768 keypair |
21346 cycles |
21347 cycles |
1.00 |
ML-KEM-768 encaps |
23931 cycles |
23930 cycles |
1.00 |
ML-KEM-768 decaps |
30498 cycles |
30497 cycles |
1.00 |
ML-KEM-1024 keypair |
30332 cycles |
30333 cycles |
1.00 |
ML-KEM-1024 encaps |
34540 cycles |
34541 cycles |
1.00 |
ML-KEM-1024 decaps |
44141 cycles |
44143 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intel Xeon 4th gen (c7i)
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
9679 cycles |
9619 cycles |
1.01 |
ML-KEM-512 encaps |
11025 cycles |
11143 cycles |
0.99 |
ML-KEM-512 decaps |
15217 cycles |
15113 cycles |
1.01 |
ML-KEM-768 keypair |
16517 cycles |
16474 cycles |
1.00 |
ML-KEM-768 encaps |
17867 cycles |
17771 cycles |
1.01 |
ML-KEM-768 decaps |
23360 cycles |
23468 cycles |
1.00 |
ML-KEM-1024 keypair |
22332 cycles |
22422 cycles |
1.00 |
ML-KEM-1024 encaps |
24378 cycles |
24257 cycles |
1.00 |
ML-KEM-1024 decaps |
32050 cycles |
31828 cycles |
1.01 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intel Xeon 4th gen (c7i) (no-opt)
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
28982 cycles |
29027 cycles |
1.00 |
ML-KEM-512 encaps |
34993 cycles |
35123 cycles |
1.00 |
ML-KEM-512 decaps |
44492 cycles |
44707 cycles |
1.00 |
ML-KEM-768 keypair |
47903 cycles |
47790 cycles |
1.00 |
ML-KEM-768 encaps |
57634 cycles |
57649 cycles |
1.00 |
ML-KEM-768 decaps |
69646 cycles |
69663 cycles |
1.00 |
ML-KEM-1024 keypair |
71520 cycles |
71437 cycles |
1.00 |
ML-KEM-1024 encaps |
83489 cycles |
83263 cycles |
1.00 |
ML-KEM-1024 decaps |
100007 cycles |
99866 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMD EPYC 4th gen (c7a)
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
11883 cycles |
11932 cycles |
1.00 |
ML-KEM-512 encaps |
13402 cycles |
13407 cycles |
1.00 |
ML-KEM-512 decaps |
18318 cycles |
18327 cycles |
1.00 |
ML-KEM-768 keypair |
20575 cycles |
20573 cycles |
1.00 |
ML-KEM-768 encaps |
21521 cycles |
21533 cycles |
1.00 |
ML-KEM-768 decaps |
28655 cycles |
28703 cycles |
1.00 |
ML-KEM-1024 keypair |
27818 cycles |
27741 cycles |
1.00 |
ML-KEM-1024 encaps |
29926 cycles |
29906 cycles |
1.00 |
ML-KEM-1024 decaps |
39249 cycles |
39235 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMD EPYC 3rd gen (c6a)
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
16865 cycles |
16854 cycles |
1.00 |
ML-KEM-512 encaps |
18599 cycles |
18603 cycles |
1.00 |
ML-KEM-512 decaps |
23992 cycles |
24012 cycles |
1.00 |
ML-KEM-768 keypair |
28651 cycles |
28699 cycles |
1.00 |
ML-KEM-768 encaps |
29713 cycles |
29701 cycles |
1.00 |
ML-KEM-768 decaps |
37513 cycles |
37499 cycles |
1.00 |
ML-KEM-1024 keypair |
41745 cycles |
41810 cycles |
1.00 |
ML-KEM-1024 encaps |
44176 cycles |
44180 cycles |
1.00 |
ML-KEM-1024 decaps |
54618 cycles |
54616 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Graviton2
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
28327 cycles |
28300 cycles |
1.00 |
ML-KEM-512 encaps |
34057 cycles |
34091 cycles |
1.00 |
ML-KEM-512 decaps |
44358 cycles |
44391 cycles |
1.00 |
ML-KEM-768 keypair |
48247 cycles |
48264 cycles |
1.00 |
ML-KEM-768 encaps |
54213 cycles |
54139 cycles |
1.00 |
ML-KEM-768 decaps |
68682 cycles |
68633 cycles |
1.00 |
ML-KEM-1024 keypair |
70513 cycles |
70480 cycles |
1.00 |
ML-KEM-1024 encaps |
78785 cycles |
78886 cycles |
1.00 |
ML-KEM-1024 decaps |
98355 cycles |
98485 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Graviton4
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
17644 cycles |
17658 cycles |
1.00 |
ML-KEM-512 encaps |
20630 cycles |
20647 cycles |
1.00 |
ML-KEM-512 decaps |
27078 cycles |
27095 cycles |
1.00 |
ML-KEM-768 keypair |
30242 cycles |
30252 cycles |
1.00 |
ML-KEM-768 encaps |
32986 cycles |
32952 cycles |
1.00 |
ML-KEM-768 decaps |
42178 cycles |
42193 cycles |
1.00 |
ML-KEM-1024 keypair |
43842 cycles |
43863 cycles |
1.00 |
ML-KEM-1024 encaps |
48921 cycles |
48901 cycles |
1.00 |
ML-KEM-1024 decaps |
61601 cycles |
61572 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMD EPYC 4th gen (c7a) (no-opt)
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
36416 cycles |
36433 cycles |
1.00 |
ML-KEM-512 encaps |
42830 cycles |
42812 cycles |
1.00 |
ML-KEM-512 decaps |
55726 cycles |
55722 cycles |
1.00 |
ML-KEM-768 keypair |
59623 cycles |
59642 cycles |
1.00 |
ML-KEM-768 encaps |
67724 cycles |
67728 cycles |
1.00 |
ML-KEM-768 decaps |
84958 cycles |
84915 cycles |
1.00 |
ML-KEM-1024 keypair |
87441 cycles |
87606 cycles |
1.00 |
ML-KEM-1024 encaps |
98588 cycles |
98491 cycles |
1.00 |
ML-KEM-1024 decaps |
120059 cycles |
120079 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMD EPYC 3rd gen (c6a) (no-opt)
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
38457 cycles |
38729 cycles |
0.99 |
ML-KEM-512 encaps |
47475 cycles |
47509 cycles |
1.00 |
ML-KEM-512 decaps |
61005 cycles |
60964 cycles |
1.00 |
ML-KEM-768 keypair |
63874 cycles |
64080 cycles |
1.00 |
ML-KEM-768 encaps |
74875 cycles |
75203 cycles |
1.00 |
ML-KEM-768 decaps |
92773 cycles |
93236 cycles |
1.00 |
ML-KEM-1024 keypair |
94450 cycles |
94402 cycles |
1.00 |
ML-KEM-1024 encaps |
108714 cycles |
108824 cycles |
1.00 |
ML-KEM-1024 decaps |
131446 cycles |
131440 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intel Xeon 3rd gen (c6i)
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
16298 cycles |
16267 cycles |
1.00 |
ML-KEM-512 encaps |
18516 cycles |
18575 cycles |
1.00 |
ML-KEM-512 decaps |
25076 cycles |
25050 cycles |
1.00 |
ML-KEM-768 keypair |
29886 cycles |
29820 cycles |
1.00 |
ML-KEM-768 encaps |
31164 cycles |
30052 cycles |
1.04 |
ML-KEM-768 decaps |
39281 cycles |
39428 cycles |
1.00 |
ML-KEM-1024 keypair |
37972 cycles |
38135 cycles |
1.00 |
ML-KEM-1024 encaps |
40578 cycles |
40402 cycles |
1.00 |
ML-KEM-1024 decaps |
54206 cycles |
54051 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Intel Xeon 3rd gen (c6i)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.03.
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-768 encaps |
31164 cycles |
30052 cycles |
1.04 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Graviton4 (no-opt)
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
35391 cycles |
35397 cycles |
1.00 |
ML-KEM-512 encaps |
40744 cycles |
40752 cycles |
1.00 |
ML-KEM-512 decaps |
51533 cycles |
51507 cycles |
1.00 |
ML-KEM-768 keypair |
58843 cycles |
58810 cycles |
1.00 |
ML-KEM-768 encaps |
65389 cycles |
66075 cycles |
0.99 |
ML-KEM-768 decaps |
80178 cycles |
80059 cycles |
1.00 |
ML-KEM-1024 keypair |
87876 cycles |
87871 cycles |
1.00 |
ML-KEM-1024 encaps |
97101 cycles |
97061 cycles |
1.00 |
ML-KEM-1024 decaps |
116310 cycles |
116331 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Graviton3
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
18679 cycles |
18684 cycles |
1.00 |
ML-KEM-512 encaps |
21990 cycles |
22017 cycles |
1.00 |
ML-KEM-512 decaps |
29011 cycles |
29025 cycles |
1.00 |
ML-KEM-768 keypair |
31909 cycles |
31932 cycles |
1.00 |
ML-KEM-768 encaps |
35034 cycles |
34998 cycles |
1.00 |
ML-KEM-768 decaps |
45035 cycles |
45062 cycles |
1.00 |
ML-KEM-1024 keypair |
46314 cycles |
46316 cycles |
1.00 |
ML-KEM-1024 encaps |
51660 cycles |
51639 cycles |
1.00 |
ML-KEM-1024 decaps |
65175 cycles |
65214 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Graviton2 (no-opt)
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
59306 cycles |
59358 cycles |
1.00 |
ML-KEM-512 encaps |
68905 cycles |
68908 cycles |
1.00 |
ML-KEM-512 decaps |
87646 cycles |
87478 cycles |
1.00 |
ML-KEM-768 keypair |
99472 cycles |
99061 cycles |
1.00 |
ML-KEM-768 encaps |
111116 cycles |
111235 cycles |
1.00 |
ML-KEM-768 decaps |
135984 cycles |
136193 cycles |
1.00 |
ML-KEM-1024 keypair |
148946 cycles |
148523 cycles |
1.00 |
ML-KEM-1024 encaps |
164365 cycles |
164134 cycles |
1.00 |
ML-KEM-1024 decaps |
195760 cycles |
195532 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intel Xeon 3rd gen (c6i) (no-opt)
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
46131 cycles |
46145 cycles |
1.00 |
ML-KEM-512 encaps |
54797 cycles |
54823 cycles |
1.00 |
ML-KEM-512 decaps |
70014 cycles |
69988 cycles |
1.00 |
ML-KEM-768 keypair |
75953 cycles |
76051 cycles |
1.00 |
ML-KEM-768 encaps |
86815 cycles |
86957 cycles |
1.00 |
ML-KEM-768 decaps |
106622 cycles |
106767 cycles |
1.00 |
ML-KEM-1024 keypair |
110590 cycles |
110709 cycles |
1.00 |
ML-KEM-1024 encaps |
125187 cycles |
125020 cycles |
1.00 |
ML-KEM-1024 decaps |
150158 cycles |
150288 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arm Cortex-A55 (Snapdragon 888) benchmarks
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
59669 cycles |
59676 cycles |
1.00 |
ML-KEM-512 encaps |
67136 cycles |
67078 cycles |
1.00 |
ML-KEM-512 decaps |
85713 cycles |
85736 cycles |
1.00 |
ML-KEM-768 keypair |
101962 cycles |
101809 cycles |
1.00 |
ML-KEM-768 encaps |
113106 cycles |
113281 cycles |
1.00 |
ML-KEM-768 decaps |
139832 cycles |
140130 cycles |
1.00 |
ML-KEM-1024 keypair |
155103 cycles |
154875 cycles |
1.00 |
ML-KEM-1024 encaps |
173576 cycles |
174072 cycles |
1.00 |
ML-KEM-1024 decaps |
208476 cycles |
208505 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Graviton3 (no-opt)
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
38766 cycles |
38796 cycles |
1.00 |
ML-KEM-512 encaps |
44829 cycles |
44879 cycles |
1.00 |
ML-KEM-512 decaps |
56731 cycles |
56661 cycles |
1.00 |
ML-KEM-768 keypair |
64183 cycles |
64172 cycles |
1.00 |
ML-KEM-768 encaps |
71839 cycles |
72698 cycles |
0.99 |
ML-KEM-768 decaps |
88202 cycles |
87936 cycles |
1.00 |
ML-KEM-1024 keypair |
95760 cycles |
95669 cycles |
1.00 |
ML-KEM-1024 encaps |
106326 cycles |
106229 cycles |
1.00 |
ML-KEM-1024 decaps |
126739 cycles |
126787 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arm Cortex-A76 (Raspberry Pi 5) benchmarks
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
28293 cycles |
28332 cycles |
1.00 |
ML-KEM-512 encaps |
34081 cycles |
34044 cycles |
1.00 |
ML-KEM-512 decaps |
44372 cycles |
44303 cycles |
1.00 |
ML-KEM-768 keypair |
48260 cycles |
48256 cycles |
1.00 |
ML-KEM-768 encaps |
54135 cycles |
54204 cycles |
1.00 |
ML-KEM-768 decaps |
68611 cycles |
68679 cycles |
1.00 |
ML-KEM-1024 keypair |
70483 cycles |
70529 cycles |
1.00 |
ML-KEM-1024 encaps |
78874 cycles |
78792 cycles |
1.00 |
ML-KEM-1024 decaps |
98469 cycles |
98343 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
c6deef6 to
7601970
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arm Cortex-A72 (Raspberry Pi 4) benchmarks
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
50722 cycles |
50614 cycles |
1.00 |
ML-KEM-512 encaps |
59145 cycles |
58401 cycles |
1.01 |
ML-KEM-512 decaps |
75567 cycles |
74301 cycles |
1.02 |
ML-KEM-768 keypair |
87269 cycles |
87611 cycles |
1.00 |
ML-KEM-768 encaps |
94803 cycles |
95625 cycles |
0.99 |
ML-KEM-768 decaps |
117469 cycles |
119633 cycles |
0.98 |
ML-KEM-1024 keypair |
129858 cycles |
130807 cycles |
0.99 |
ML-KEM-1024 encaps |
141849 cycles |
142733 cycles |
0.99 |
ML-KEM-1024 decaps |
173419 cycles |
173779 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SpacemiT K1 8 (Banana Pi F3) benchmarks
| Benchmark suite | Current: 5417f9d | Previous: 9e33bc7 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
155253 cycles |
155250 cycles |
1.00 |
ML-KEM-512 encaps |
163113 cycles |
163086 cycles |
1.00 |
ML-KEM-512 decaps |
206373 cycles |
206279 cycles |
1.00 |
ML-KEM-768 keypair |
260963 cycles |
260886 cycles |
1.00 |
ML-KEM-768 encaps |
275547 cycles |
275441 cycles |
1.00 |
ML-KEM-768 decaps |
337793 cycles |
337712 cycles |
1.00 |
ML-KEM-1024 keypair |
394995 cycles |
395000 cycles |
1.00 |
ML-KEM-1024 encaps |
423534 cycles |
423570 cycles |
1.00 |
ML-KEM-1024 decaps |
504651 cycles |
504537 cycles |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
This commit introduces helper functions mlk_cast_int32_to_uint16 and mlk_cast_int16_to_uint16 for casting int32_t/int16_t to uint16_t. This cleans up prior code and also removes the need for some pragmas stopping CBMC from flagging value-changing integer conversions. We also rewrite mlk_ct_cmask_nonzero_u8 and mlk_ct_cmask_nonzero_u16 to no longer involve unsigned overflow, which previously also required silencing CBMC through a pragma. Signed-off-by: Hanno Becker <[email protected]>
Signed-off-by: Hanno Becker <[email protected]>
06b051b to
5417f9d
Compare
No description provided.